package ScannerDemo;

import java.util.Scanner;

public class ScnnerDemo {
    public static void main(String[] args) {
        //新的api
        Scanner scanner = new Scanner(System.in);
        //录入字符串string
        String s =scanner.next();
        System.out.println(s);
        //录入整型数字
        int c =scanner.nextInt();
        System.out.println("数字是" + c);

        //录入浮点类型数字
        float v = scanner.nextFloat();
        System.out.println("小数是：" + v);

        //录入boolean类型的值
        boolean b =scanner.nextBoolean();
        System.out.println(b);

    }
}
